package com.dylon.system.domain;

import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

@Data
public class SysRole extends BaseEntity {
    private static final long serialVersionUID = 1L;

    private Long    roleId;
    private String  roleName;  //'名称',
    private String  roleKey;  //'角色权限字符串',
    private Integer orderNum; //'显示顺序',
    private String  dataScope;//'数据范围，1全部数据权限，2自定义数据权限',
    private String  status;   //'状态，0正常，1禁用',

    private boolean flag = false; //用户是否存在此角色标识 默认不存在

    /** 菜单组 */
    private Long[] menuIds;

    /** 部门组（数据权限） */
    private Long[] deptIds;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("roleId", getRoleId())
                .append("roleName", getRoleName())
                .append("roleKey", getRoleKey())
                .append("orderNum", getOrderNum())
                .append("dataScope", getDataScope())
                .append("status", getStatus())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
